package com.ms.p2p.dao;


import com.ms.p2p.entity.system.PayMethodValue;
import com.ms.p2p.entity.system.RbacDept;
import com.ms.p2p.entity.system.RbacDeptRole;
import com.ms.p2p.entity.system.RbacRole;
import org.apache.ibatis.annotations.Param;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * Created by daimajia on 2017/6/30.
 */

public interface RbacDao extends CrudDao {
    List<Map<String,Object>> getRoles(@Param("deptId") String deptId);

    List findDepts();


    void deleteByDeptId(@Param("deptId") String deptId);


//    void save(RbacDeptRole rbacDeptRole);

    List<RbacRole> findDeptRolesByPid(@Param("deptId") int dept_id,@Param("pid") String pid);

    List<HashMap<String,Object>> findPager(@Param("begin") int begin, @Param("size")Integer pageSize);

    int findCount();

    RbacDept selectDeptById(@Param("id") String id);

    void updateRbacDept(@Param("id") String id, @Param("name") String name);

    void insertRbacDept(@Param("name")  String name);

    boolean checkPremission(@Param("id") Integer id,@Param("premission")  String premission);

    List<Map<String, Object>> getPager( @Param("begin") int begin,
                                       @Param("size") Integer pageSize);
}
